import {transformRecordToOption} from '@/utils/common';

export const yesOrNoRecord: Record<CommonType.YesOrNo, string> = {
  Y: 'common.yesOrNo.yes',
  N: 'common.yesOrNo.no'
};
export const yesOrNoOptions = transformRecordToOption(yesOrNoRecord);

/**
 * 组织分类
 */
export const orgCategoryRecord: Record<Api.SystemManage.OrgCategory, string> = {
  'COMPANY': '公司',
  'DEPT': '部门'
};

export const orgCategoryOptions = transformRecordToOption(orgCategoryRecord);

/**
 * 角色分类
 */
export const roleCategoryRecord: Record<Api.SystemManage.RoleCategory, string> = {
  'GLOBAL': '全局',
  'ORG': '机构'
};

export const roleCategoryOptions = transformRecordToOption(roleCategoryRecord);

/**
 * 职位分类
 */
export const positionCategoryRecord: Record<Api.SystemManage.PositionCategory, string> = {
  'HIGH': '高层',
  'MIDDLE': '中层',
  'LOW': '基层'
};

export const positionCategoryOptions = transformRecordToOption(positionCategoryRecord);

/**
 * 资源分类
 *
 */
export const resourceCategoryRecord: Record<Api.SystemManage.ResourceCategory, string> = {
  'CATALOG': '目录',
  'MENU': '菜单',
  'IFRAME': '内链',
  'LINK': '外链'
};

export const resourceCategoryOptions = transformRecordToOption(resourceCategoryRecord);
